package com.daidai.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class UserDaoActive {

    @Pointcut("execution(void com.daidai.UserDao.selectUser())")
    public void pt(){}

    @Around("pt()")
    public Object around(ProceedingJoinPoint joinPoint) throws Throwable {

        System.out.println("before...");
        Object proceed = joinPoint.proceed();
        System.out.println("after...");

        return proceed;
    }


}
